#include "CubeMapSphereEffect.h"

namespace D3D10Effects
{
    CubeMapSphereEffect::CubeMapSphereEffect(ID3D10Device * const device, const std::wstring& filename)
        : Effect(device, filename)
        , mTechnique(nullptr)
        , mWVP(nullptr)
        , mWorld(nullptr)
        , mTextureMatrix(nullptr)
        , mEyePosition(nullptr)
        , mLight(nullptr)
        , mDiffuseMap(nullptr)
        , mSpecularMap(nullptr)
        , mCubeMap(nullptr)
    {
    	mTechnique = mEffect->GetTechniqueByName("CubeMapSphereTech");
	    mWVP = mEffect->GetVariableByName("gWVP")->AsMatrix();
	    mWorld = mEffect->GetVariableByName("gWorld")->AsMatrix();
	    mTextureMatrix = mEffect->GetVariableByName("gTexMtx")->AsMatrix();
	    mEyePosition = mEffect->GetVariableByName("gEyePosW");
	    mLight = mEffect->GetVariableByName("gLight");
        mDiffuseMap = mEffect->GetVariableByName("gDiffuseMap")->AsShaderResource();
	    mSpecularMap = mEffect->GetVariableByName("gSpecMap")->AsShaderResource();
        mCubeMap = mEffect->GetVariableByName("gCubeMap")->AsShaderResource();
    }

    CubeMapSphereEffect::~CubeMapSphereEffect() 
    {
    
    }
}